import React, { Component } from 'react'
import './index.css'
import { Row, Col } from 'antd';
import { Input } from 'antd';
import { MenuOutlined, SearchOutlined } from '@ant-design/icons';

export default class Navbar extends Component {
  render () {
    return (
      <div className="Navbar">
        <Row className="Navbar_Row">
          <Col span={4} className="firstIcon">
            <MenuOutlined className="MenuOutlined" onClick={this.handleOpenLeft} />
          </Col>
          <Col span={16} className="Navbar_Search">
            <Input type='text' onClick={this.handleSearch} prefix={<SearchOutlined />} style={{ fontSize: '0.3rem', borderRadius: '0.3rem', paddingLeft: '0.2rem' }} />
          </Col>
          <Col span={4}></Col>
        </Row>
      </div>
    )
  }

  // 打开侧边栏
  handleOpenLeft = () => {
    console.log(1);
  }
  // 点击搜索框
  handleSearch = () => {
    console.log(2);
  }
}
